package com.adams.utils;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class AppContext
{

	private static ApplicationContext appContext;

	public static ApplicationContext getContext() {
		return appContext;
	}



	public static void setContext(ApplicationContext appContext) {
		AppContext.appContext = appContext;
	}



	public static void load(String configFile)
	{
		appContext = new ClassPathXmlApplicationContext(configFile);
	}
	
	

	public static Object getBean(String name)
	{
		return appContext.getBean(name);
	}

}
